/*
 * @Description: 身份卡片
 * @Author: iamsmiling
 * @Date: 2021-06-06 11:27:03
 * @LastEditTime: 2021-06-06 11:44:58
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/components/image/chimera_image.dart';
import 'package:credit_business_circle/pages/publish_square/children/publish_center/widget/selector_text_field.dart';
import 'package:flutter/material.dart';

class IdentityFormCard extends StatelessWidget {
  const IdentityFormCard({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(R.dimen.dp10),
      padding: EdgeInsets.fromLTRB(R.dimen.dp10, R.dimen.dp10, R.dimen.dp10, 0),
      decoration: BoxDecoration(
          color: R.color.ffffffff,
          borderRadius: BorderRadius.circular(R.dimen.sp5)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          SelectorTextField(
            label: "发布身份",
            onTap: () => Future.value(),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: R.dimen.dp15),
            child: Row(
              children: [
                Container(
                  margin: EdgeInsets.only(right: R.dimen.dp10),
                  child: ChimeraImage(
                      width: R.dimen.dp40,
                      height: R.dimen.dp40,
                      borderRadius: BorderRadius.circular(R.dimen.dp40 / 2),
                      src: "https://i.loli.net/2021/04/13/t3M15Z8oQCSLAgb.png"),
                ),
                Expanded(
                    child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Row(
                      children: [
                        Text(
                          "马化腾（先生）",
                          style: TextStyle(
                              fontSize: R.dimen.sp13, color: R.color.ff333333),
                        ),
                        Container(
                          margin: EdgeInsets.only(left: R.dimen.dp10),
                          padding: EdgeInsets.symmetric(
                              horizontal: R.dimen.dp10, vertical: R.dimen.dp2),
                          decoration: BoxDecoration(
                              gradient: LinearGradient(
                                  colors: [R.color.ff0fbde8, R.color.ff39cded]),
                              borderRadius: BorderRadius.circular(R.dimen.sp9)),
                          child: Row(
                            children: [
                              Image.asset(R.image.person),
                              Container(
                                margin: EdgeInsets.only(left: R.dimen.dp4),
                                child: Text(
                                  "已实名",
                                  style: TextStyle(
                                      fontSize: R.dimen.sp11,
                                      color: R.color.ffffffff),
                                ),
                              )
                            ],
                          ),
                        )
                      ],
                    ),
                    Container(
                      margin: EdgeInsets.only(top: R.dimen.dp4),
                      child: Text(
                        "总经理 | 杭州叮咚网络科技有限公司",
                        style: TextStyle(
                            fontSize: R.dimen.sp11, color: R.color.ff999999),
                      ),
                    )
                  ],
                ))
              ],
            ),
          ),
          Container(
            width: double.maxFinite,
            padding: EdgeInsets.all(R.dimen.dp10),
            decoration: BoxDecoration(color: R.color.fffaf8e9),
            child: Text(
              "以下联系信息将会展示给合作伙伴",
              style: TextStyle(fontSize: R.dimen.sp12, color: R.color.ff935425),
            ),
          ),
          SelectorTextField(
            label: "手机号",
            onTap: () => Future.value(),
          ),
          SelectorTextField(
            label: "微信号",
            hintText: "请输入微信号",
          ),
          SelectorTextField(
            label: "QQ账号",
            isRequired: false,
            hintText: "请输入QQ号",
          ),
          SelectorTextField(
            label: "电子邮箱",
            isRequired: false,
            hintText: "请输入电子信箱",
            dividerColor: R.color.transparent,
          ),
        ],
      ),
    );
  }
}
